3.52 \(\int \frac{d+e x^2+f x^4}{x^3 (a+b x^2+c x^4)} \, dx\)

Optimal. Leaf size=118 \[ -\frac{\tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right ) \left (-a b e-2 a (c d-a f)+b^2 d\right )}{2 a^2 \sqrt{b^2-4 a c}}+\frac{(b d-a e) \log \left (a+b x^2+c x^4\right )}{4 a^2}-\frac{\log (x) (b d-a e)}{a^2}-\frac{d}{2 a x^2} \]

[Out]

-d/(2*a*x^2) - ((b^2*d - a*b*e - 2*a*(c*d - a*f))*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*a^2*Sqrt[b^2 -
4*a*c]) - ((b*d - a*e)*Log[x])/a^2 + ((b*d - a*e)*Log[a + b*x^2 + c*x^4])/(4*a^2)

________________________________________________________________________________________

Rubi [A]  time = 0.285348, antiderivative size = 118, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {1663, 1628, 634, 618, 206, 628} \[ -\frac{\tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right ) \left (-a b e-2 a (c d-a f)+b^2 d\right )}{2 a^2 \sqrt{b^2-4 a c}}+\frac{(b d-a e) \log \left (a+b x^2+c x^4\right )}{4 a^2}-\frac{\log (x) (b d-a e)}{a^2}-\frac{d}{2 a x^2} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x^2 + f*x^4)/(x^3*(a + b*x^2 + c*x^4)),x]

[Out]

-d/(2*a*x^2) - ((b^2*d - a*b*e - 2*a*(c*d - a*f))*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*a^2*Sqrt[b^2 -
4*a*c]) - ((b*d - a*e)*Log[x])/a^2 + ((b*d - a*e)*Log[a + b*x^2 + c*x^4])/(4*a^2)

Rule 1663

Int[(Pq_)*(x_)^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Dist[1/2, Subst[Int[x^((m - 1)/2)
*SubstFor[x^2, Pq, x]*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x^2] && Inte
gerQ[(m - 1)/2]

Rule 1628

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{d+e x^2+f x^4}{x^3 \left (a+b x^2+c x^4\right )} \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{d+e x+f x^2}{x^2 \left (a+b x+c x^2\right )} \, dx,x,x^2\right )\\ &=\frac{1}{2} \operatorname{Subst}\left (\int \left (\frac{d}{a x^2}+\frac{-b d+a e}{a^2 x}+\frac{b^2 d-a b e-a (c d-a f)+c (b d-a e) x}{a^2 \left (a+b x+c x^2\right )}\right ) \, dx,x,x^2\right )\\ &=-\frac{d}{2 a x^2}-\frac{(b d-a e) \log (x)}{a^2}+\frac{\operatorname{Subst}\left (\int \frac{b^2 d-a b e-a (c d-a f)+c (b d-a e) x}{a+b x+c x^2} \, dx,x,x^2\right )}{2 a^2}\\ &=-\frac{d}{2 a x^2}-\frac{(b d-a e) \log (x)}{a^2}+\frac{(b d-a e) \operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,x^2\right )}{4 a^2}+\frac{\left (b^2 d-a b e-2 a (c d-a f)\right ) \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,x^2\right )}{4 a^2}\\ &=-\frac{d}{2 a x^2}-\frac{(b d-a e) \log (x)}{a^2}+\frac{(b d-a e) \log \left (a+b x^2+c x^4\right )}{4 a^2}-\frac{\left (b^2 d-a b e-2 a (c d-a f)\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{2 a^2}\\ &=-\frac{d}{2 a x^2}-\frac{\left (b^2 d-a b e-2 a (c d-a f)\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 a^2 \sqrt{b^2-4 a c}}-\frac{(b d-a e) \log (x)}{a^2}+\frac{(b d-a e) \log \left (a+b x^2+c x^4\right )}{4 a^2}\\ \end{align*}

Mathematica [A]  time = 0.161855, size = 203, normalized size = 1.72 \[ \frac{\frac{\log \left (-\sqrt{b^2-4 a c}+b+2 c x^2\right ) \left (a \left (-e \sqrt{b^2-4 a c}+2 a f-2 c d\right )+b \left (d \sqrt{b^2-4 a c}-a e\right )+b^2 d\right )}{\sqrt{b^2-4 a c}}+\frac{\log \left (\sqrt{b^2-4 a c}+b+2 c x^2\right ) \left (-a \left (e \sqrt{b^2-4 a c}+2 a f-2 c d\right )+b \left (d \sqrt{b^2-4 a c}+a e\right )+b^2 (-d)\right )}{\sqrt{b^2-4 a c}}+4 \log (x) (a e-b d)-\frac{2 a d}{x^2}}{4 a^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x^2 + f*x^4)/(x^3*(a + b*x^2 + c*x^4)),x]

[Out]

((-2*a*d)/x^2 + 4*(-(b*d) + a*e)*Log[x] + ((b^2*d + b*(Sqrt[b^2 - 4*a*c]*d - a*e) + a*(-2*c*d - Sqrt[b^2 - 4*a
*c]*e + 2*a*f))*Log[b - Sqrt[b^2 - 4*a*c] + 2*c*x^2])/Sqrt[b^2 - 4*a*c] + ((-(b^2*d) + b*(Sqrt[b^2 - 4*a*c]*d
+ a*e) - a*(-2*c*d + Sqrt[b^2 - 4*a*c]*e + 2*a*f))*Log[b + Sqrt[b^2 - 4*a*c] + 2*c*x^2])/Sqrt[b^2 - 4*a*c])/(4
*a^2)

________________________________________________________________________________________

Maple [B]  time = 0.009, size = 227, normalized size = 1.9 \begin{align*} -{\frac{d}{2\,a{x}^{2}}}+{\frac{\ln \left ( x \right ) e}{a}}-{\frac{\ln \left ( x \right ) bd}{{a}^{2}}}-{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ) e}{4\,a}}+{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ) bd}{4\,{a}^{2}}}+{f\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{be}{2\,a}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{cd}{a}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}+{\frac{{b}^{2}d}{2\,{a}^{2}}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x^4+e*x^2+d)/x^3/(c*x^4+b*x^2+a),x)

[Out]

-1/2*d/a/x^2+1/a*ln(x)*e-1/a^2*ln(x)*b*d-1/4/a*ln(c*x^4+b*x^2+a)*e+1/4/a^2*ln(c*x^4+b*x^2+a)*b*d+1/(4*a*c-b^2)
^(1/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*f-1/2/a/(4*a*c-b^2)^(1/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*b
*e-1/a/(4*a*c-b^2)^(1/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*c*d+1/2/a^2/(4*a*c-b^2)^(1/2)*arctan((2*c*x^2+b
)/(4*a*c-b^2)^(1/2))*b^2*d

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^4+e*x^2+d)/x^3/(c*x^4+b*x^2+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.99112, size = 873, normalized size = 7.4 \begin{align*} \left [-\frac{{\left (a b e - 2 \, a^{2} f -{\left (b^{2} - 2 \, a c\right )} d\right )} \sqrt{b^{2} - 4 \, a c} x^{2} \log \left (\frac{2 \, c^{2} x^{4} + 2 \, b c x^{2} + b^{2} - 2 \, a c -{\left (2 \, c x^{2} + b\right )} \sqrt{b^{2} - 4 \, a c}}{c x^{4} + b x^{2} + a}\right ) -{\left ({\left (b^{3} - 4 \, a b c\right )} d -{\left (a b^{2} - 4 \, a^{2} c\right )} e\right )} x^{2} \log \left (c x^{4} + b x^{2} + a\right ) + 4 \,{\left ({\left (b^{3} - 4 \, a b c\right )} d -{\left (a b^{2} - 4 \, a^{2} c\right )} e\right )} x^{2} \log \left (x\right ) + 2 \,{\left (a b^{2} - 4 \, a^{2} c\right )} d}{4 \,{\left (a^{2} b^{2} - 4 \, a^{3} c\right )} x^{2}}, \frac{2 \,{\left (a b e - 2 \, a^{2} f -{\left (b^{2} - 2 \, a c\right )} d\right )} \sqrt{-b^{2} + 4 \, a c} x^{2} \arctan \left (-\frac{{\left (2 \, c x^{2} + b\right )} \sqrt{-b^{2} + 4 \, a c}}{b^{2} - 4 \, a c}\right ) +{\left ({\left (b^{3} - 4 \, a b c\right )} d -{\left (a b^{2} - 4 \, a^{2} c\right )} e\right )} x^{2} \log \left (c x^{4} + b x^{2} + a\right ) - 4 \,{\left ({\left (b^{3} - 4 \, a b c\right )} d -{\left (a b^{2} - 4 \, a^{2} c\right )} e\right )} x^{2} \log \left (x\right ) - 2 \,{\left (a b^{2} - 4 \, a^{2} c\right )} d}{4 \,{\left (a^{2} b^{2} - 4 \, a^{3} c\right )} x^{2}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^4+e*x^2+d)/x^3/(c*x^4+b*x^2+a),x, algorithm="fricas")

[Out]

[-1/4*((a*b*e - 2*a^2*f - (b^2 - 2*a*c)*d)*sqrt(b^2 - 4*a*c)*x^2*log((2*c^2*x^4 + 2*b*c*x^2 + b^2 - 2*a*c - (2
*c*x^2 + b)*sqrt(b^2 - 4*a*c))/(c*x^4 + b*x^2 + a)) - ((b^3 - 4*a*b*c)*d - (a*b^2 - 4*a^2*c)*e)*x^2*log(c*x^4
+ b*x^2 + a) + 4*((b^3 - 4*a*b*c)*d - (a*b^2 - 4*a^2*c)*e)*x^2*log(x) + 2*(a*b^2 - 4*a^2*c)*d)/((a^2*b^2 - 4*a
^3*c)*x^2), 1/4*(2*(a*b*e - 2*a^2*f - (b^2 - 2*a*c)*d)*sqrt(-b^2 + 4*a*c)*x^2*arctan(-(2*c*x^2 + b)*sqrt(-b^2
+ 4*a*c)/(b^2 - 4*a*c)) + ((b^3 - 4*a*b*c)*d - (a*b^2 - 4*a^2*c)*e)*x^2*log(c*x^4 + b*x^2 + a) - 4*((b^3 - 4*a
*b*c)*d - (a*b^2 - 4*a^2*c)*e)*x^2*log(x) - 2*(a*b^2 - 4*a^2*c)*d)/((a^2*b^2 - 4*a^3*c)*x^2)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x**4+e*x**2+d)/x**3/(c*x**4+b*x**2+a),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.12911, size = 182, normalized size = 1.54 \begin{align*} \frac{{\left (b d - a e\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \, a^{2}} - \frac{{\left (b d - a e\right )} \log \left (x^{2}\right )}{2 \, a^{2}} + \frac{{\left (b^{2} d - 2 \, a c d + 2 \, a^{2} f - a b e\right )} \arctan \left (\frac{2 \, c x^{2} + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{2 \, \sqrt{-b^{2} + 4 \, a c} a^{2}} + \frac{b d x^{2} - a x^{2} e - a d}{2 \, a^{2} x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^4+e*x^2+d)/x^3/(c*x^4+b*x^2+a),x, algorithm="giac")

[Out]

1/4*(b*d - a*e)*log(c*x^4 + b*x^2 + a)/a^2 - 1/2*(b*d - a*e)*log(x^2)/a^2 + 1/2*(b^2*d - 2*a*c*d + 2*a^2*f - a
*b*e)*arctan((2*c*x^2 + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c)*a^2) + 1/2*(b*d*x^2 - a*x^2*e - a*d)/(a^2*x
^2)